<?php
/*
# ------------------------------------------------------------------------
# JA Job Board Package
# ------------------------------------------------------------------------
# Copyright (C) 2004-2010 JoomlArt.com. All Rights Reserved.
# @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
# Author: JoomlArt.com
# Websites: http://www.joomlart.com - http://www.joomlancers.com.
# ------------------------------------------------------------------------
*/
  defined('_JEXEC') or die('Retricted Access');
  $arr_remove_file = array('index.html');
?>

<form name="adminForm" action="index.php" method="post">
    <div style="width:100%;">
    	<?php echo $this->menu(); ?>
		<table class="adminlist">
        	<thead>
            	<tr>
            		<th width="15%" class="title"><?php echo JText::_( 'Folder' ); ?></th>
            		<th>
            			<?php echo JText::_('File Name'); ?>
            		</th>            		          		            		
            		<th align="center" width="15%" ><?php echo JText::_('Status'); ?></th>
					<th align="center" width="15%"><?php echo JText::_('Action'); ?></th>
            	</tr>
			</thead>
			<tbody>
        	<?php
        	$files = $this->files;
        	
        	for($i = 0; $i < count($files); $i++){
        		$folder = $files[$i];
        		if (in_array($files[$i],$arr_remove_file))		
        			continue;
        		?>
        		<tr class="row<?php echo $i%2; ?>">
        			<td align="left">
   						CSS
            		</td>  
            		<td align="left">
   						<?php echo $files[$i]; ?>
            		</td>   
            		 
            		<td align="center">
  						<?php if(JFile::exists(JPATH_SITE . DS. 'templates'. DS . $this->template. DS. 'css'. DS .$files[$i] )){        						
 								$confirm = JText::_('Are you sure you want to restore this css file? If you choose Yes, the changes will be lost. CSS file will be restored to the original default.');
 								?>
 								<img src="components/com_jajobboard/images/modified.gif" title="<?php echo JText::_('Modified')?>" alt="<?php echo JText::_('Modified')?>"/>
 							 	 [<a onclick="return confirm('<?php echo $confirm?>')" href="index.php?option=com_jajobboard&view=jacustomcss&task=restore&&folder=<?php echo $folder.'&file='.$files[$i]?>" title="<?php echo JText::_('Restore to default')?>"><?php echo JText::_('Restore')?></a>]
 							 <?php }else{?>
 							 	<img src="components/com_jajobboard/images/notmodified.gif" title="<?php echo JText::_('Not Modified')?>" alt="<?php echo JText::_('Not Modified')?>"/>
 							 <?php }?>
    				</td>
    				<td align="center">
    						<a href="<?php echo JRoute::_( 'index.php?option='. $this->lists['option'] .'&view=jacustomcss&viewmenu=0&task=edit&file='.$files[$i] ); ?>">
    						<?php echo JText::_('Edit'); ?>
    						</a>
    						
    				</td>    		          		            	
            	</tr>
        	<?php
        	
			}
        	?>
        	<tbody>        	
		</table>
	</div>
	
	
	<input type="hidden" name="option" value="<?php echo $this->lists['option']; ?>" />
	<input type="hidden" name="view" value="jacustomcss" />
	<input type="hidden" name="task" value="" />
	<?php echo JHTML::_( 'form.token' ); ?>	
 </form>
